package com.atguigu.tingshu.model.account;

import com.atguigu.tingshu.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * <p>
 *     用户账户 对应 user_account 表
 * </p>
 * @author sun
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("user_account")
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class UserAccount extends BaseEntity {

	@Serial
	private static final long serialVersionUID = 1L;
	/**
	 * 用户id
	 */
	@TableField("user_id")
	private Long userId;
	/**
	 * 账户总金额
	 */
	@TableField("total_amount")
	private BigDecimal totalAmount;
	/**
	 * 锁定金额
	 */
	@TableField("lock_amount")
	private BigDecimal lockAmount;
	/**
	 * 可用金额
	 */
	@TableField("available_amount")
	private BigDecimal availableAmount;
	/**
	 * 总收入
	 */
	@TableField("total_income_amount")
	private BigDecimal totalIncomeAmount;
	/**
	 * 总支出
	 */
	@TableField("total_pay_amount")
	private BigDecimal totalPayAmount;

}